package mvc.handlers;

import mvc.framework.*;

/**
 * Handler per gestire la visualizzazione della home page 
 * (si tratta di una visualizzazione della pagina predefinita)
 * 
 * @author Grillo
 */
public class HomeHandler extends AbsRequestHandler {
    private final static String ACTION_NAME = "home";

    public HomeHandler(DialogHandler dHandler) {
        super(dHandler);
    }

    public String getActionName() {
        return ACTION_NAME;
    }
    
    public void setNextPage() {
        nextPage = "/views/home.jsp";
    }
    
    public int validate() {
        return SUCCESS;
    }

    public int execute() {
        return SUCCESS;
    }

    @Override
    public IRequestHandler clone(DialogHandler dHandler) throws CloneNotSupportedException {
        return new HomeHandler(dHandler);
    } 
}